﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PearTunes.Model.User>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ManageUsers
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Felhasználók kezelése</h2>
    <fieldset>
    <table>
        <tr><th>Törlés</th><th>Id</th><th>Név</th><th>Email</th><th>Egyenleg</th></tr>
        
        <%
        foreach (PearTunes.Model.User u in Model)
        {%>
        
            <tr>
            <td>
              <%if (u.Name != "admin")
                { %>
                    <%=Html.ActionLink("Törlés", "DeleteUser", new { id = u.UserId.ToString() })%>
             <% } %>
            </td>
               <td><%=Html.Label(u.UserId.ToString()) %></td>
               <td><%=Html.Label(u.Name) %></td>
               <td><%=Html.Label(u.Email)%></td>
               <td><%=Html.Label(u.Money.ToString())%></td>
               <%--<td><%=Html.Label(u.BoughtTracks.Count().ToString())%></td>--%>
            </tr>
            
    <%  }  %>
    </table>
    <p>
    <%--<input type="submit" value="Kijelöltek törlése" />--%>
    </p>
    </fieldset>
</asp:Content>
